require 'google-pr'
class PagerankController < ApplicationController
  layout"signup"

  def show
   remote_url = request.env['HTTP_REFERER']
   if remote_url      
     if RAILS_ENV == "development"
       pr = "-1"
     else
       pr = (SEO::GooglePR.new( remote_url ).page_rank rescue "-1")
     end
   else
     pr = "-1"
   end
   path= RAILS_ROOT + "/public/images/pr/v_pr#{pr}.gif"
   send_file(path,
             :disposition   => 'inline',
             :buffer_size   => 2096)
  end
  def getpr
    @feature_img = "features/pagerank.png"
  end
end
